
export default eventHandler(async (event) => {
  const url = "https://qianfan.baidubce.com/v2/app/conversation/runs"
  const headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer ' + process.env.BCE_SECRET
  }
  const data = $fetch(url, {
    headers: headers, method: 'POST',
    body: {
      app_id: process.env.BCE_APP_ID,
      query: '帮我写一个小米手机的小红书文案',
      stream: false,
      conversation_id: "9b4530ed-34d4-4a6b-abea-9c5230a3aa8c",
    }
  })
  console.log(data)

  return data
})
